package com.zone.service.service.impl;

import java.util.List;
import com.zone.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zone.service.mapper.FixZswsRouteMapper;
import com.zone.service.domain.FixZswsRoute;
import com.zone.service.service.IFixZswsRouteService;

/**
 * 固定线路Service业务层处理
 * 
 * @author liuyang
 * @date 2025-11-18
 */
@Service
public class FixZswsRouteServiceImpl implements IFixZswsRouteService 
{
    @Autowired
    private FixZswsRouteMapper fixZswsRouteMapper;

    /**
     * 查询固定线路
     * 
     * @param id 固定线路主键
     * @return 固定线路
     */
    @Override
    public FixZswsRoute selectFixZswsRouteById(Long id)
    {
        return fixZswsRouteMapper.selectFixZswsRouteById(id);
    }

    /**
     * 查询固定线路列表
     * 
     * @param fixZswsRoute 固定线路
     * @return 固定线路
     */
    @Override
    public List<FixZswsRoute> selectFixZswsRouteList(FixZswsRoute fixZswsRoute)
    {
        return fixZswsRouteMapper.selectFixZswsRouteList(fixZswsRoute);
    }

    /**
     * 新增固定线路
     * 
     * @param fixZswsRoute 固定线路
     * @return 结果
     */
    @Override
    public int insertFixZswsRoute(FixZswsRoute fixZswsRoute)
    {
        fixZswsRoute.setCreateTime(DateUtils.getNowDate());
        return fixZswsRouteMapper.insertFixZswsRoute(fixZswsRoute);
    }

    /**
     * 修改固定线路
     * 
     * @param fixZswsRoute 固定线路
     * @return 结果
     */
    @Override
    public int updateFixZswsRoute(FixZswsRoute fixZswsRoute)
    {
        fixZswsRoute.setUpdateTime(DateUtils.getNowDate());
        return fixZswsRouteMapper.updateFixZswsRoute(fixZswsRoute);
    }

    /**
     * 批量删除固定线路
     * 
     * @param ids 需要删除的固定线路主键
     * @return 结果
     */
    @Override
    public int deleteFixZswsRouteByIds(Long[] ids)
    {
        return fixZswsRouteMapper.deleteFixZswsRouteByIds(ids);
    }

    /**
     * 删除固定线路信息
     * 
     * @param id 固定线路主键
     * @return 结果
     */
    @Override
    public int deleteFixZswsRouteById(Long id)
    {
        return fixZswsRouteMapper.deleteFixZswsRouteById(id);
    }
}
